package com.study.ioc.demo;

import com.study.ioc.demo.label.MyLabel1;
import com.study.ioc.demo.label.MyLabel2;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class MyLabelTest {

    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("label/myLabel.xml");
        MyLabel1 myLabel1 = (MyLabel1) context.getBean("1");
        MyLabel2 myLabel2 = (MyLabel2) context.getBean("2");
        System.out.println(myLabel1.toString());
        System.out.println(myLabel1.toString());
    }
}
